#ifndef __MODBUS_H
#define __MODBUS_H

#include "main.h"

typedef struct mb_para* mb_para_t;
struct mb_para {
    uint8_t slave_addr;
    uint32_t mb_interface;  //接口
    uint8_t* mb_rx_buf;
    uint16_t mb_rx_cnt;
    void (*mb_tx)(uint8_t* buf, uint16_t len);
//    struct uart_dev uart;
};
extern struct mb_para g_mb_para;

extern uint8_t iap_flag;

void mb_get_bms_info(void);
void modbus_master_task(void);

#endif
